<template>
	<div id="index_order">
		this is {{pageMsg}} page 111111阿斯大三大四的
	</div>
</template>

<script>

export default{
	components:{
	},
	data(){
		return {
				pageMsg:this.$route.name
            }  
	},
	beforeMount(){
		this.checkRoute(this.$route.name);
	},
	mounted(){
		this.pageMsg = this.$route.name;
	},
	methods:{
		checkRoute(name){
			this.pageMsg = name;
			switch(name){
				case 'weiz':
					console.log('this is 1');
					break;
				case 'meif':
					console.log('this is 2');
					break;
				case 'doc':
					console.log('this is 3');
					break;
				case 'hos':
					console.log('this is hos');
					break;
			}

		}
	},
	beforeRouteLeave (to,from,next){
		this.checkRoute(to.name);
		next()
	}
}
</script>
